Skip to content

fix: Allow the same prefab for many turret configs#2

Open
Pyetrek wants to merge 1 commit intoMeatwareMonster:masterfrom
Pyetrek:master
Open

fix: Allow the same prefab for many turret configs#2
Pyetrek wants to merge 1 commit intoMeatwareMonster:masterfrom
Pyetrek:master

Conversation

@Pyetrek
Copy link

@Pyetrek Pyetrek commented Sep 4, 2022

Fix bug that did not allow you to use the same prefab for multiple different turret configs. Now you can specify turrets with different resource costs and damage values, but utilize the already provided prefabs many times.

An example of using the same prefab is shown below

[
  {
    "name": "Ballista",
    "bundleName": "turrets",
    "prefabPath": "Assets/_Project/Prefabs/MMBallista.prefab",
    "description": "Shoots a projectile dealing damage. Able to hit flying monsters",
    "pieceTable": "Hammer",
    "enabled": true,
    "type": "Projectile",
    "fireInterval": 2,
    "pierceDamage": 16,
    "range": 20,
    "canShootFlying": true,
    "resources": [
      {
        "item": "Bronze",
        "amount": 10
      },
      {
        "item": "RoundLog",
        "amount": 20
      }
    ]
  },
  {
    "name": "Improved Ballista",
    "bundleName": "turrets",
    "prefabPath": "Assets/_Project/Prefabs/MMBallista.prefab",
    "description": "Shoots a projectile dealing damage. Able to hit flying monsters",
    "pieceTable": "Hammer",
    "enabled": true,
    "type": "Projectile",
    "fireInterval": 2,
    "pierceDamage": 30,
    "range": 20,
    "canShootFlying": true,
    "resources": [
      {
        "item": "Iron",
        "amount": 20
      },
      {
        "item": "FineWood",
        "amount": 20
      }
    ]
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant